<template>
	<view class="page">
		<sign-uplpad :customerId="customerId" :businessId="formData.businessId" title="企业纳税等级" type="taxLevel"
			v-if="showUpload" @refresh="refresh"></sign-uplpad>
		<u-gap height="20" bg-color="#f0f2f6"></u-gap>
		<!-- 企业欠税信息 -->
		<customer-tax :customerId="customerId"></customer-tax>
		<u-gap height="20" bg-color="#f0f2f6"></u-gap>
		<sign-uplpad :customerId="customerId" :businessId="formData.businessId" title="企业历史经营异常及违法失信信息"
			type="historyOperate" v-if="showUpload" @refresh="refresh"></sign-uplpad>
		<files-list :customerId="customerId" title="企业历史经营异常及违法失信信息附件" type="qylsjyycjwfsxxx"></files-list>
		<u-gap height="20" bg-color="#f0f2f6"></u-gap>
		<sign-uplpad :customerId="customerId" :businessId="formData.businessId" title="企业实收资本" type="paidInCapital"
			v-if="showUpload" @refresh="refresh"></sign-uplpad>
		<u-gap height="20" bg-color="#f0f2f6"></u-gap>
		<sign-uplpad :customerId="customerId" :businessId="formData.businessId" title="企业电费信息" type="electricityFee"
			v-if="showUpload" @refresh="refresh"></sign-uplpad>
		<u-gap height="20" bg-color="#f0f2f6"></u-gap>
		<sign-uplpad :customerId="customerId" :businessId="formData.businessId" title="企业专利及著作权数量" type="softWorks"
			v-if="showUpload" @refresh="refresh"></sign-uplpad>
		<u-gap height="20" bg-color="#f0f2f6"></u-gap>
		<sign-uplpad :customerId="customerId" :businessId="formData.businessId" title="企业商标数量" type="trademark"
			v-if="showUpload" @refresh="refresh"></sign-uplpad>
		<u-gap height="20" bg-color="#f0f2f6"></u-gap>
		<sign-uplpad :customerId="customerId" :businessId="formData.businessId" title="企业未结案涉案总额" type="caseInvolved"
			v-if="showUpload" @refresh="refresh"></sign-uplpad>
		<u-gap height="20" bg-color="#f0f2f6"></u-gap>
		<!-- 企业涉诉信息 -->
		<customer-litigation :customerId="customerId"></customer-litigation>
		<!-- 重大关系人驾车情况 -->
		<major-drivers :customerId="customerId"></major-drivers>
		<!-- 企业保险情况 -->
		<customer-insurance :customerId="customerId"></customer-insurance>
		<!-- 重大关系人保险情况 -->
		<major-insurance :customerId="customerId"></major-insurance>
	</view>
</template>

<script>
	import customerTax from './customertax.vue';
	import customerLitigation from './customerlitigation.vue';
	import majorDrivers from './majordrivers.vue';
	import customerInsurance from './customerinsurance.vue';
	import majorInsurance from './majorinsurance.vue';

	import signUplpad from '@/pagesJiushi/customer/actualController/components/signUplpad.vue'
	import filesList from '@/pagesJiushi/customer/actualController/components/filesList.vue'
	export default {
		components: {
			signUplpad,
			customerTax,
			customerLitigation,
			majorDrivers,
			customerInsurance,
			majorInsurance,
			filesList
		},
		name: 'others',
		props: {
			customerId: {
				type: [Number, String],
				default () {
					return ''
				}
			}
		},
		data() {
			return {
				formData: {},
				showUpload: false,
			};
		},
		watch: {
			customerId: {
				immediate: true,
				deep: true,
				handler(val) {
					this.getFormData()
				}
			}
		},
		methods: {
			refresh() {
				this.showUpload = false
				this.$nextTick(() => {
					this.showUpload = true;
				});
			},
			getFormData() {
				this.$helper.ajax({
					url: "/api/Jiushi/Customerbase/" + this.customerId,
					method: "GET",
					contentType: "application/json",
					success: res => {
						if (res.data.data != null) {
							this.formData = res.data.data
							this.showUpload = true
						}

					}
				});
			},
		},
	}
</script>

<style lang="scss" scoped>

</style>